package lab02.Text32;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/11/9.
 */
public class Text {
    public static void main(String[] args) {
        Map<String, String> person = new HashMap<>();
        // id—>"1"、name—>"张三"、gender—>"男"、 age—>"25"、love—>"爱学Java"
        person.put("id", "1");
        person.put("name", "张三");
        person.put("gender", "男");
        person.put("age", "25");
        person.put("love", "爱学Java");
        for (Map.Entry<String, String> entry : person.entrySet()) {
            System.out.println(entry.getKey() + "," + entry.getValue());
        }
            System.out.println("Map集合的大小是："+person.size());
            for(Map.Entry<String,String>entry :person.entrySet()) {
                if (entry.getKey().equals("age")){
                    person.remove(entry.getKey());
                }
            }
            System.out.println("Map集合的大小是："+person.size());
        }




    }

